﻿import 'package:star_author/generated/json/base/json_convert_content.dart';
import 'package:star_author/model/backflow_list_item_entity.dart';
import 'dart:ui';


BackflowListItemEntity $BackflowListItemEntityFromJson(Map<String, dynamic> json) {
	final BackflowListItemEntity backflowListItemEntity = BackflowListItemEntity();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		backflowListItemEntity.id = id;
	}
	final String? number = jsonConvert.convert<String>(json['number']);
	if (number != null) {
		backflowListItemEntity.number = number;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		backflowListItemEntity.status = status;
	}
	final int? expired_evaluation_duration_with_count_down = jsonConvert.convert<int>(json['expired_evaluation_duration_with_count_down']);
	if (expired_evaluation_duration_with_count_down != null) {
		backflowListItemEntity.expired_evaluation_duration_with_count_down = expired_evaluation_duration_with_count_down;
	}
	final bool? immediateSupport = jsonConvert.convert<bool>(json['immediate_support']);
	if (immediateSupport != null) {
		backflowListItemEntity.immediateSupport = immediateSupport;
	}
	final int? stock = jsonConvert.convert<int>(json['stock']);
	if (stock != null) {
		backflowListItemEntity.stock = stock;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		backflowListItemEntity.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		backflowListItemEntity.updatedAt = updatedAt;
	}
	final dynamic? evaluatedPrice = jsonConvert.convert<dynamic>(json['evaluated_price']);
	if (evaluatedPrice != null) {
		backflowListItemEntity.evaluatedPrice = evaluatedPrice;
	}
	final dynamic? confirmedPrice = jsonConvert.convert<dynamic>(json['confirmed_price']);
	if (confirmedPrice != null) {
		backflowListItemEntity.confirmedPrice = confirmedPrice;
	}
	final dynamic? onsaleAt = jsonConvert.convert<dynamic>(json['onsale_at']);
	if (onsaleAt != null) {
		backflowListItemEntity.onsaleAt = onsaleAt;
	}
	final int? approvedEvaluationCount = jsonConvert.convert<int>(json['approved_evaluation_count']);
	if (approvedEvaluationCount != null) {
		backflowListItemEntity.approvedEvaluationCount = approvedEvaluationCount;
	}
	final dynamic? expiredAt = jsonConvert.convert<dynamic>(json['expired_at']);
	if (expiredAt != null) {
		backflowListItemEntity.expiredAt = expiredAt;
	}
	final int? userId = jsonConvert.convert<int>(json['user_id']);
	if (userId != null) {
		backflowListItemEntity.userId = userId;
	}
	final String? storeCode = jsonConvert.convert<String>(json['store_code']);
	if (storeCode != null) {
		backflowListItemEntity.storeCode = storeCode;
	}
	final List<dynamic>? priceRange = jsonConvert.convertListNotNull<dynamic>(json['price_range']);
	if (priceRange != null) {
		backflowListItemEntity.priceRange = priceRange;
	}
	final String? rejectedReason = jsonConvert.convert<String>(json['rejected_reason']);
	if (rejectedReason != null) {
		backflowListItemEntity.rejectedReason = rejectedReason;
	}
	final String? comment = jsonConvert.convert<String>(json['comment']);
	if (comment != null) {
		backflowListItemEntity.comment = comment;
	}
	final dynamic? finishedAt = jsonConvert.convert<dynamic>(json['finished_at']);
	if (finishedAt != null) {
		backflowListItemEntity.finishedAt = finishedAt;
	}
	final String? backflowReceivedAddress = jsonConvert.convert<String>(json['backflow_received_address']);
	if (backflowReceivedAddress != null) {
		backflowListItemEntity.backflowReceivedAddress = backflowReceivedAddress;
	}
	final dynamic? moneyForOwner = jsonConvert.convert<dynamic>(json['money_for_owner']);
	if (moneyForOwner != null) {
		backflowListItemEntity.moneyForOwner = moneyForOwner;
	}
	final String? immediateDiscountPrice = jsonConvert.convert<String>(json['immediate_discount_price']);
	if (immediateDiscountPrice != null) {
		backflowListItemEntity.immediateDiscountPrice = immediateDiscountPrice;
	}
	final String? normalDiscountPrice = jsonConvert.convert<String>(json['normal_discount_price']);
	if (normalDiscountPrice != null) {
		backflowListItemEntity.normalDiscountPrice = normalDiscountPrice;
	}
	final int? limited = jsonConvert.convert<int>(json['limited']);
	if (limited != null) {
		backflowListItemEntity.limited = limited;
	}
	final String? strategy = jsonConvert.convert<String>(json['strategy']);
	if (strategy != null) {
		backflowListItemEntity.strategy = strategy;
	}
	final int? tendersCount = jsonConvert.convert<int>(json['tenders_count']);
	if (tendersCount != null) {
		backflowListItemEntity.tendersCount = tendersCount;
	}
	final String? rateForTender = jsonConvert.convert<String>(json['rate_for_tender']);
	if (rateForTender != null) {
		backflowListItemEntity.rateForTender = rateForTender;
	}
	final dynamic? previewConfirmedPrice = jsonConvert.convert<dynamic>(json['preview_confirmed_price']);
	if (previewConfirmedPrice != null) {
		backflowListItemEntity.previewConfirmedPrice = previewConfirmedPrice;
	}
	final String? backCode = jsonConvert.convert<String>(json['back_code']);
	if (backCode != null) {
		backflowListItemEntity.backCode = backCode;
	}
	final String? rateForHitter = jsonConvert.convert<String>(json['rate_for_hitter']);
	if (rateForHitter != null) {
		backflowListItemEntity.rateForHitter = rateForHitter;
	}
	final int? evaluationLimited = jsonConvert.convert<int>(json['evaluation_limited']);
	if (evaluationLimited != null) {
		backflowListItemEntity.evaluationLimited = evaluationLimited;
	}
	final dynamic? takeDownAt = jsonConvert.convert<dynamic>(json['take_down_at']);
	if (takeDownAt != null) {
		backflowListItemEntity.takeDownAt = takeDownAt;
	}
	final bool? recyclable = jsonConvert.convert<bool>(json['recyclable']);
	if (recyclable != null) {
		backflowListItemEntity.recyclable = recyclable;
	}
	final bool? isOfflineSaling = jsonConvert.convert<bool>(json['is_offline_saling']);
	if (isOfflineSaling != null) {
		backflowListItemEntity.isOfflineSaling = isOfflineSaling;
	}
	final String? expiredEvaluatedAt = jsonConvert.convert<String>(json['expired_evaluated_at']);
	if (expiredEvaluatedAt != null) {
		backflowListItemEntity.expiredEvaluatedAt = expiredEvaluatedAt;
	}
	final bool? isExpiredEvaluation = jsonConvert.convert<bool>(json['is_expired_evaluation']);
	if (isExpiredEvaluation != null) {
		backflowListItemEntity.isExpiredEvaluation = isExpiredEvaluation;
	}
	final String? evaluatedAt = jsonConvert.convert<String>(json['evaluated_at']);
	if (evaluatedAt != null) {
		backflowListItemEntity.evaluatedAt = evaluatedAt;
	}
	final int? needTendersCount = jsonConvert.convert<int>(json['need_tenders_count']);
	if (needTendersCount != null) {
		backflowListItemEntity.needTendersCount = needTendersCount;
	}
	final int? alreadyTendersCount = jsonConvert.convert<int>(json['already_tenders_count']);
	if (alreadyTendersCount != null) {
		backflowListItemEntity.alreadyTendersCount = alreadyTendersCount;
	}
	final String? rateForDeductingImmediateCompetitiveStrategy = jsonConvert.convert<String>(json['rate_for_deducting_immediate_competitive_strategy']);
	if (rateForDeductingImmediateCompetitiveStrategy != null) {
		backflowListItemEntity.rateForDeductingImmediateCompetitiveStrategy = rateForDeductingImmediateCompetitiveStrategy;
	}
	final dynamic? sendBackAt = jsonConvert.convert<dynamic>(json['send_back_at']);
	if (sendBackAt != null) {
		backflowListItemEntity.sendBackAt = sendBackAt;
	}
	final bool? firstEvaluation = jsonConvert.convert<bool>(json['first_evaluation']);
	if (firstEvaluation != null) {
		backflowListItemEntity.firstEvaluation = firstEvaluation;
	}
	final bool? sonance = jsonConvert.convert<bool>(json['sonance']);
	if (sonance != null) {
		backflowListItemEntity.sonance = sonance;
	}
	final int? expressLogsId = jsonConvert.convert<int>(json['express_logs_id']);
	if (expressLogsId != null) {
		backflowListItemEntity.expressLogsId = expressLogsId;
	}
	final BackflowListItemGoods? goods = jsonConvert.convert<BackflowListItemGoods>(json['goods']);
	if (goods != null) {
		backflowListItemEntity.goods = goods;
	}
	final dynamic? logistic = jsonConvert.convert<dynamic>(json['logistic']);
	if (logistic != null) {
		backflowListItemEntity.logistic = logistic;
	}
	final dynamic? backLogistic = jsonConvert.convert<dynamic>(json['back_logistic']);
	if (backLogistic != null) {
		backflowListItemEntity.backLogistic = backLogistic;
	}
	final dynamic? backAddress = jsonConvert.convert<dynamic>(json['back_address']);
	if (backAddress != null) {
		backflowListItemEntity.backAddress = backAddress;
	}
	final dynamic? rating = jsonConvert.convert<dynamic>(json['rating']);
	if (rating != null) {
		backflowListItemEntity.rating = rating;
	}
	final int? previousMaxTenderPrice = jsonConvert.convert<int>(json['previous_max_tender_price']);
	if (previousMaxTenderPrice != null) {
		backflowListItemEntity.previousMaxTenderPrice = previousMaxTenderPrice;
	}
	final bool? isImmediate = jsonConvert.convert<bool>(json['is_immediate']);
	if (isImmediate != null) {
		backflowListItemEntity.isImmediate = isImmediate;
	}
	final bool? isSpecialOffer = jsonConvert.convert<bool>(json['is_special_offer']);
	if (isSpecialOffer != null) {
		backflowListItemEntity.isSpecialOffer = isSpecialOffer;
	}
	final bool? canOnsaleAgain = jsonConvert.convert<bool>(json['can_onsale_again']);
	if (canOnsaleAgain != null) {
		backflowListItemEntity.canOnsaleAgain = canOnsaleAgain;
	}
	final bool? canEvaluatedAgain = jsonConvert.convert<bool>(json['can_evaluated_again']);
	if (canEvaluatedAgain != null) {
		backflowListItemEntity.canEvaluatedAgain = canEvaluatedAgain;
	}
	final bool? canOnsaleFromBack = jsonConvert.convert<bool>(json['can_onsale_from_back']);
	if (canOnsaleFromBack != null) {
		backflowListItemEntity.canOnsaleFromBack = canOnsaleFromBack;
	}
	final dynamic? kloneId = jsonConvert.convert<dynamic>(json['klone_id']);
	if (kloneId != null) {
		backflowListItemEntity.kloneId = kloneId;
	}
	final dynamic? originalId = jsonConvert.convert<dynamic>(json['original_id']);
	if (originalId != null) {
		backflowListItemEntity.originalId = originalId;
	}
	final dynamic? tenderPrice = jsonConvert.convert<dynamic>(json['tender_price']);
	if (tenderPrice != null) {
		backflowListItemEntity.tenderPrice = tenderPrice;
	}
	final bool? shopped = jsonConvert.convert<bool>(json['shopped']);
	if (shopped != null) {
		backflowListItemEntity.shopped = shopped;
	}
	final bool? canOnsaleFromClosed = jsonConvert.convert<bool>(json['can_onsale_from_closed']);
	if (canOnsaleFromClosed != null) {
		backflowListItemEntity.canOnsaleFromClosed = canOnsaleFromClosed;
	}
	final String? illustration = jsonConvert.convert<String>(json['illustration']);
	if (illustration != null) {
		backflowListItemEntity.illustration = illustration;
	}
	final String? rateForDeducting = jsonConvert.convert<String>(json['rate_for_deducting']);
	if (rateForDeducting != null) {
		backflowListItemEntity.rateForDeducting = rateForDeducting;
	}
	final String? cover = jsonConvert.convert<String>(json['cover']);
	if (cover != null) {
		backflowListItemEntity.cover = cover;
	}
	return backflowListItemEntity;
}

Map<String, dynamic> $BackflowListItemEntityToJson(BackflowListItemEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['number'] = entity.number;
	data['status'] = entity.status;
	data['expired_evaluation_duration_with_count_down'] = entity.expired_evaluation_duration_with_count_down;
	data['immediate_support'] = entity.immediateSupport;
	data['stock'] = entity.stock;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	data['evaluated_price'] = entity.evaluatedPrice;
	data['confirmed_price'] = entity.confirmedPrice;
	data['onsale_at'] = entity.onsaleAt;
	data['approved_evaluation_count'] = entity.approvedEvaluationCount;
	data['expired_at'] = entity.expiredAt;
	data['user_id'] = entity.userId;
	data['store_code'] = entity.storeCode;
	data['price_range'] =  entity.priceRange;
	data['rejected_reason'] = entity.rejectedReason;
	data['comment'] = entity.comment;
	data['finished_at'] = entity.finishedAt;
	data['backflow_received_address'] = entity.backflowReceivedAddress;
	data['money_for_owner'] = entity.moneyForOwner;
	data['immediate_discount_price'] = entity.immediateDiscountPrice;
	data['normal_discount_price'] = entity.normalDiscountPrice;
	data['limited'] = entity.limited;
	data['strategy'] = entity.strategy;
	data['tenders_count'] = entity.tendersCount;
	data['rate_for_tender'] = entity.rateForTender;
	data['preview_confirmed_price'] = entity.previewConfirmedPrice;
	data['back_code'] = entity.backCode;
	data['rate_for_hitter'] = entity.rateForHitter;
	data['evaluation_limited'] = entity.evaluationLimited;
	data['take_down_at'] = entity.takeDownAt;
	data['recyclable'] = entity.recyclable;
	data['is_offline_saling'] = entity.isOfflineSaling;
	data['expired_evaluated_at'] = entity.expiredEvaluatedAt;
	data['is_expired_evaluation'] = entity.isExpiredEvaluation;
	data['evaluated_at'] = entity.evaluatedAt;
	data['need_tenders_count'] = entity.needTendersCount;
	data['already_tenders_count'] = entity.alreadyTendersCount;
	data['rate_for_deducting_immediate_competitive_strategy'] = entity.rateForDeductingImmediateCompetitiveStrategy;
	data['send_back_at'] = entity.sendBackAt;
	data['first_evaluation'] = entity.firstEvaluation;
	data['sonance'] = entity.sonance;
	data['express_logs_id'] = entity.expressLogsId;
	data['goods'] = entity.goods?.toJson();
	data['logistic'] = entity.logistic;
	data['back_logistic'] = entity.backLogistic;
	data['back_address'] = entity.backAddress;
	data['rating'] = entity.rating;
	data['previous_max_tender_price'] = entity.previousMaxTenderPrice;
	data['is_immediate'] = entity.isImmediate;
	data['is_special_offer'] = entity.isSpecialOffer;
	data['can_onsale_again'] = entity.canOnsaleAgain;
	data['can_evaluated_again'] = entity.canEvaluatedAgain;
	data['can_onsale_from_back'] = entity.canOnsaleFromBack;
	data['klone_id'] = entity.kloneId;
	data['original_id'] = entity.originalId;
	data['tender_price'] = entity.tenderPrice;
	data['shopped'] = entity.shopped;
	data['can_onsale_from_closed'] = entity.canOnsaleFromClosed;
	data['illustration'] = entity.illustration;
	data['rate_for_deducting'] = entity.rateForDeducting;
	data['cover'] = entity.cover;
	return data;
}

BackflowListItemGoods $BackflowListItemGoodsFromJson(Map<String, dynamic> json) {
	final BackflowListItemGoods backflowListItemGoods = BackflowListItemGoods();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		backflowListItemGoods.id = id;
	}
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		backflowListItemGoods.description = description;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		backflowListItemGoods.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		backflowListItemGoods.updatedAt = updatedAt;
	}
	final dynamic? weight = jsonConvert.convert<dynamic>(json['weight']);
	if (weight != null) {
		backflowListItemGoods.weight = weight;
	}
	final dynamic? texture = jsonConvert.convert<dynamic>(json['texture']);
	if (texture != null) {
		backflowListItemGoods.texture = texture;
	}
	final dynamic? circle = jsonConvert.convert<dynamic>(json['circle']);
	if (circle != null) {
		backflowListItemGoods.circle = circle;
	}
	final int? count = jsonConvert.convert<int>(json['count']);
	if (count != null) {
		backflowListItemGoods.count = count;
	}
	final String? processStatus = jsonConvert.convert<String>(json['process_status']);
	if (processStatus != null) {
		backflowListItemGoods.processStatus = processStatus;
	}
	final String? certificate = jsonConvert.convert<String>(json['certificate']);
	if (certificate != null) {
		backflowListItemGoods.certificate = certificate;
	}
	final String? specification = jsonConvert.convert<String>(json['specification']);
	if (specification != null) {
		backflowListItemGoods.specification = specification;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		backflowListItemGoods.title = title;
	}
	final String? category = jsonConvert.convert<String>(json['category']);
	if (category != null) {
		backflowListItemGoods.category = category;
	}
	final String? category_prefix = jsonConvert.convert<String>(json['category_prefix']);
	if (category_prefix != null) {
		backflowListItemGoods.category_prefix = category_prefix;
	}
	final int? categoryId = jsonConvert.convert<int>(json['category_id']);
	if (categoryId != null) {
		backflowListItemGoods.categoryId = categoryId;
	}
	final String? serial = jsonConvert.convert<String>(json['serial']);
	if (serial != null) {
		backflowListItemGoods.serial = serial;
	}
	final BackflowListItemGoodsCover? cover = jsonConvert.convert<BackflowListItemGoodsCover>(json['cover']);
	if (cover != null) {
		backflowListItemGoods.cover = cover;
	}
	return backflowListItemGoods;
}

Map<String, dynamic> $BackflowListItemGoodsToJson(BackflowListItemGoods entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['description'] = entity.description;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	data['weight'] = entity.weight;
	data['texture'] = entity.texture;
	data['circle'] = entity.circle;
	data['count'] = entity.count;
	data['process_status'] = entity.processStatus;
	data['certificate'] = entity.certificate;
	data['specification'] = entity.specification;
	data['title'] = entity.title;
	data['category'] = entity.category;
	data['category_prefix'] = entity.category_prefix;
	data['category_id'] = entity.categoryId;
	data['serial'] = entity.serial;
	data['cover'] = entity.cover?.toJson();
	return data;
}

BackflowListItemGoodsCover $BackflowListItemGoodsCoverFromJson(Map<String, dynamic> json) {
	final BackflowListItemGoodsCover backflowListItemGoodsCover = BackflowListItemGoodsCover();
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		backflowListItemGoodsCover.url = url;
	}
	final int? width = jsonConvert.convert<int>(json['width']);
	if (width != null) {
		backflowListItemGoodsCover.width = width;
	}
	final int? height = jsonConvert.convert<int>(json['height']);
	if (height != null) {
		backflowListItemGoodsCover.height = height;
	}
	return backflowListItemGoodsCover;
}

Map<String, dynamic> $BackflowListItemGoodsCoverToJson(BackflowListItemGoodsCover entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['url'] = entity.url;
	data['width'] = entity.width;
	data['height'] = entity.height;
	return data;
}